<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width,initial-scale=1.0,maximum-scale=1.0,user-scalable=0" />
    <!-- 全屏 -->
    <meta name="apple-mobile-web-app-capable" content="yes" />
    <!-- 上方栏显示 -->
    <meta name="apple-mobile-web-app-status-bar-style" content="black" />
    <!-- 不自动识别号码 -->
    <meta name="format-detection" content="telephone=no">
    <!-- Include js plugin -->
    <title><{if $type == 3}>作业列表<{else if $type == 4}>我的考试<{/if}></title>
    <link rel="stylesheet" href="/static/wap/skin/css/layout.css">
    <link rel="stylesheet" href="/static/wap/skin/css/demos.css">
</head>
<body>
<header class="brB">
    <div class="h_top">
        <div class="hLeft"><a href="/" class="icoH icoReturn mt20"></a></div>
        <div class="hCenter"><span class="tit c-3ac9af"><{if $type == 3}>作业列表<{else if $type == 4}>我的考试<{/if}></span></div>
    </div>
</header>
<div class="warp" style="padding-right: 10px;">
    <div class="fix b-FFFFFF">
        <blockquote class="layui-elem-quote" style="font-size: 12px;">
			<p>
			<{if $test_volume_data.status == 0 }>
			<span style="color:red">本次考试尚未交卷，无法计算考试结果</span>
			<{else}>
			本次答题从 <span style="color:red"><{$test_volume_data.begin_time|date_format:'%Y-%m-%d %H:%M:%S'}></span> 至 <span style="color:red"><{$test_volume_data.end_time|date_format:'%Y-%m-%d %H:%M:%S'}></span>、 耗时共：<span style="color:red"><{($test_volume_data.end_time - $test_volume_data.begin_time)|changeTimeType}></span>、得分：<span style="color:red"><{$test_volume_data.fraction}></span>分、正确率：<span style="color:red"><{$test_volume_data.right_percentage}>%</span>
			<{/if}>
			</p>
			
			<{foreach from=$topic_type_analys key=key item=item1}>
				<p style="padding: 10px 0;">
				<{$item1.name}>(共<{$topic_list[$key]|count|default:0}>题)：答对：<{$item1.right_num}>题，答错：<{$item1.wrong_num}>题，得分：<{$item1.fraction}>分
				</p>
			<{/foreach}>
		</blockquote>
		<form class="form-horizontal layui-form layui-form-pane" method="post" action="/classes/save_home_work">
			<{foreach from=$test_volume_data item=item key=key}>
			<input type="hidden" name="<{$key}>" value="<{$item}>" >
			<{/foreach}>
			<br/><br/>
			<{foreach from=$topic_list item=topic key=tkey}>
				<blockquote class="layui-elem-quote" style="font-size: 20px;">
				<{if $tkey == 1}>单选题<{/if}>
				<{if $tkey == 2}>多选题<{/if}>
				<{if $tkey == 3}>判断题<{/if}>
				<{if $tkey == 4}>计算分析题<{/if}>
				<{if $tkey == 7}>不定向选择题<{/if}>
				<{if $tkey == 8}>名词解释<{/if}>
				<{if $tkey == 9}>简答题<{/if}>
				 共<{$topic|count}>题
				</blockquote>
				
				<{foreach from=$topic item=topic_info name=foo}>
				<blockquote class="layui-elem-quote layui-quote-nm">
					<h1 style="font-size: 16px;font-weight: bold; "><{$smarty.foreach.foo.iteration}>.<{$topic_info.subject_text}></h1>
					<hr>
					<{assign var="right_topics" value=""}>
					<{if $tkey != 4}>
					<{foreach from=$topic_info.result item=result key=key}>
						<p style="padding:6px 0;">
						<{if $tkey == 1 || $tkey == 3}><input type="radio" title="<{$letter[$key]}>" disabled <{if $result.is_right == 1}>checked<{/if}>/><{/if}>
						<{if $tkey == 2}><input type="checkbox" disabled <{if $result.is_right == 1}>checked<{/if}>/><{/if}>
							<{$result.answer_text}>
							
							<{if $result.is_right == 1}>
								<{$right_topics = $right_topics|cat:$letter[$key]|cat:"、"}>
							<{/if}>
						</p>
					<{/foreach}>
					<{if $topic_info.type == 8 || $topic_info.type == 9}>
					<p style="color:#000; padding:16px 0;"><span style="font-weight: bold;color:">你的答案：</span>
						<{$topic_info.user_answer.user_answers}>
					</p>
					<{else}>
					<p style="color:green; padding:16px 0;"><span style="font-weight: bold;">正确答案：</span><{$right_topics|mb_substr:0:-1}></p>
					<p style="color:#000; padding:16px 0;"><span style="font-weight: bold;color:">你的答案：</span>
						<{assign var="daan" value="0"}>
						<{foreach from=$topic_info.result item=result key=key}>
						<{if $result.id|in_array:$topic_info.user_answer}>
							<{assign var="user_right_topics" value=""}>
							<{$user_right_topics = $user_right_topics|cat:$letter[$key]|cat:"、"}>
							<{$user_right_topics|mb_substr:0:-1}>
							<{assign var="daan" value=$daan+1}>
						<{/if}>
						<{/foreach}>
						<{if $daan == 0}>
						未作答
						<{/if}>
					</p>
					<{/if}>
					<{else}>
						<{foreach from=$topic_info.result key=k item=item}>
							<{foreach from=$item key=k item=analys_item}>
							<div class="layui-tab-item layui-show">
								<div class="layui-form-item layui-form-text">
									<div class="layui-input-block">
										<{$k+1}>、<{$analys_item.subject_text}>
									</div>
								</div>
								
								<{if $analys_item.analys_type == 1}>
								<div class="layui-form-item tk_answer">
									<div class="layui-inline">
										<label class="layui-form-label">子题干答案</label>
										<div class="layui-input-block">
											<input type="text" name="analys[<{$analys_item.answer_list[0].aid}>][<{$analys_item.answer_list[0].id}>][answer_text]" value="<{$analys_item.answer_list[0].answer_text}>" disabled autocomplete="off" class="layui-input" style="">
										</div>
									</div>
								</div>
								<{else}>
								<{foreach from=$analys_item.answer_list key=k item=analys_result}>
								<div class="layui-form-item fl_answer">
									<div class="layui-inline">
										<label class="layui-form-label">借贷方向</label>
										<div class="layui-input-block">
											<select disabled name="analys[<{$analys_result.aid}>][<{$analys_result.id}>][type]">
												<option value="1" <{if $analys_result.type == 1}>selected<{/if}>>借</option>
												<option value="2" <{if $analys_result.type == 2}>selected<{/if}>>贷</option>
											</select>
										</div>
									</div>
									<div class="layui-inline">
										<label class="layui-form-label">选择科目</label>
										<div class="layui-input-block">
											<input type="hidden" class="accounts" name="analys[<{$analys_result.aid}>][<{$analys_result.id}>][topic_subject_id]" >
											<input type="text" autocomplete="off" class="layui-input" value="<{$analys_result.topic_subject_title}>" disabled>
										</div>
									</div>
									<div class="layui-inline">
										<label class="layui-form-label">答案</label>
										<div class="layui-input-block">
											<input type="text" name="analys[<{$analys_result.aid}>][<{$analys_result.id}>][answer_text]" value="<{$analys_result.answer_text}>" disabled autocomplete="off" class="layui-input">
										</div>
									</div>
								</div>
								<{/foreach}>
								<{/if}>

							</div>
						<{/foreach}>
					<{/foreach}>

					<fieldset class="layui-elem-field" style="background-color: #fafafa;color: #999;">
					<legend>你的答案</legend>
					<div class="layui-field-box">
					<{foreach from=$topic_info.result key=k item=item}>
						<{foreach from=$item key=k item=analys_item}>

							<div class="layui-tab-item layui-show">
								<div class="layui-form-item layui-form-text">
									<div class="layui-input-block">
										<{$k+1}>、<{$analys_item.subject_text}>
									</div>
								</div>
								
								<{if $analys_item.analys_type == 1}>
								<div class="layui-form-item tk_answer">
									<div class="layui-inline">
										<label class="layui-form-label">子题干答案</label>
										<div class="layui-input-block">
											<input type="text" name="" value="<{if !empty($analys_item.user_answer_list[$analys_item.answer_list[0].id])}><{$analys_item.user_answer_list[$analys_item.answer_list[0].id]['answer_text']}><{/if}>" disabled autocomplete="off" class="layui-input" style="">
										</div>
									</div>
								</div>
								<{else}>
								<{foreach from=$analys_item.answer_list key=k item=analys_result}>
								<div class="layui-form-item fl_answer">
									<div class="layui-inline">
										<label class="layui-form-label">借贷方向</label>
										<div class="layui-input-block">
											<select disabled name="">
												<option value="1" <{if !empty($analys_item.user_answer_list[$analys_item.answer_list[$k].id]) AND $analys_item.user_answer_list[$analys_item.answer_list[$k].id] == 1}>selected<{/if}>>借</option>
												<option value="2" <{if !empty($analys_item.user_answer_list[$analys_item.answer_list[$k].id]) AND $analys_item.user_answer_list[$analys_item.answer_list[$k].id] == 2}>selected<{/if}>>贷</option>
											</select>
										</div>
									</div>
									<div class="layui-inline">
										<label class="layui-form-label">选择科目</label>
										<div class="layui-input-block">
											<input type="hidden" class="accounts" name="" >
											<input type="text" autocomplete="off" class="layui-input" value="<{if !empty($analys_item.user_answer_list[$analys_item.answer_list[$k].id])}><{$analys_item.user_answer_list[$analys_item.answer_list[$k].id]['topic_subject_id']|get_topic_subject}><{/if}>" disabled>
										</div>
									</div>
									<div class="layui-inline">
										<label class="layui-form-label">答案</label>
										<div class="layui-input-block">
											<input type="text" name="" value="<{if !empty($analys_item.user_answer_list[$analys_item.answer_list[$k].id])}><{$analys_item.user_answer_list[$analys_item.answer_list[$k].id]['answer_text']}><{/if}>" disabled autocomplete="off" class="layui-input">
										</div>
									</div>
								</div>
								<{/foreach}>
								<{/if}>

							</div>
						<{/foreach}>
					<{/foreach}>
					</div>
					</fieldset>
					
					<{/if}>
					<fieldset class="layui-elem-field" style="background-color: #fafafa;color: #999;">
						<legend>答题解析</legend>
						<div class="layui-field-box">
						<p style="font-weight: bold;"><{$topic_info.analysis}></p>
					  </div>
					</fieldset>
				</blockquote>
				<{/foreach}>
			<{/foreach}>
		</form>
    </div>
</div>
 	<link href="/static/public/layer/src/css/layui.css" rel="stylesheet">
    <script src="/static/public/layer/src/layui.js"></script>
    <script type="text/javascript">
        layui.use(['form'], function(){
            var form = layui.form();

        });
    </script>

</body>
</html>